<#include "../common_js.html">
<#include "../common_css.html">

<!-- page specific plugin styles -->
        <link rel="stylesheet" href="${ctx}/static/admin/assets/css/jquery-ui.custom.css" />
        <link rel="stylesheet" href="${ctx}/static/admin/assets/css/chosen.css" />
        <link rel="stylesheet" href="${ctx}/static/admin/assets/css/datepicker.css" />

        <script src="${ctx}/static/admin/assets/js/jquery.dataTables.js"></script>
        <script src="${ctx}/static/admin/assets/js/jquery.dataTables.bootstrap.js"></script>
        <script src="${ctx}/static/admin/assets/js/ajaxfileupload.js"></script>
        <script src="${ctx}/static/admin/assets/js/bootstrap-wysiwyg.js"></script>

        <script type="text/javascript">
            var $path_assets = "${ctx}/static/admin/assets/";//this will be used in loading jQuery UI if needed!
        </script>
        <script type="text/javascript">
            jQuery(function($){

                if(!ace.vars['touch']) {
                    $('.chosen-select').chosen({allow_single_deselect:true});
                    //resize the chosen on window resize

                    $(window)
                            .off('resize.chosen')
                            .on('resize.chosen', function() {
                                $('.chosen-select').each(function() {
                                    var $this = $(this);
                                    $this.next().css({'width': $this.parent().width()});
                                })
                            }).trigger('resize.chosen');
                    //resize chosen on sidebar collapse/expand
                    $(document).on('settings.ace.chosen', function(e, event_name, event_val) {
                        if(event_name != 'sidebar_collapsed') return;
                        $('.chosen-select').each(function() {
                            var $this = $(this);
                            $this.next().css({'width': $this.parent().width()});
                        })
                    });


                    $('#chosen-multiple-style .btn').on('click', function(e){
                        var target = $(this).find('input[type=radio]');
                        var which = parseInt(target.val());
                        if(which == 2) $('#form-field-select-4').addClass('tag-input-style');
                        else $('#form-field-select-4').removeClass('tag-input-style');
                    });
                }

                $("#categoryId").change(function () {
                    //清除二级下拉列表
                    $("#category2").empty();
                    $("#category2").append($("<option/>").text("--请选择二级分类--").attr("value","0"));
                    //要请求的二级下拉JSON获取页面
                    var url="${ctx}/admin/soft/getCatagories.do";
                    //将选中的一级下拉列表项的id传过去
                    $.getJSON(url, { id:$(this).val() },function (data) {
                        //对请求返回的JSON格式进行分解加载
                        $(data).each(function () {
                            $("#categoryId2").append($("<option/>").text(this.categoryName).attr("value",this.id));
                        });
                    });
                });

                $("#categoryId2").change(function () {
                    //清除二级下拉列表
                    $("#categoryId3").empty();
                    $("#categoryId3").append($("<option/>").text("--请选择三级分类--").attr("value","0"));
                    //要请求的二级下拉JSON获取页面
                    var url="${ctx}/admin/soft/getCatagories.do";
                    //将选中的一级下拉列表项的id传过去
                    $.getJSON(url, { id:$(this).val() },function (data) {
                        //对请求返回的JSON格式进行分解加载
                        $(data).each(function () {
                            $("#categoryId3").append($("<option/>").text(this.categoryName).attr("value",this.id));
                        });
                    });
                });

                function showErrorAlert (reason, detail) {
                    var msg='';
                    if (reason==='unsupported-file-type') { msg = "Unsupported format " +detail; }
                    else {
                        //console.log("error uploading file", reason, detail);
                    }
                    $('<div class="alert"> <button type="button" class="close" data-dismiss="alert">&times;</button>'+
                    '<strong>File upload error</strong> '+msg+' </div>').prependTo('#alerts');
                }

                $('#descriptiondiv').ace_wysiwyg({
                    toolbar:
                            [
                                'font',
                                null,
                                'fontSize',
                                null,
                                {name:'bold', className:'btn-info'},
                                {name:'italic', className:'btn-info'},
                                {name:'strikethrough', className:'btn-info'},
                                {name:'underline', className:'btn-info'},
                                null,
                                {name:'insertunorderedlist', className:'btn-success'},
                                {name:'insertorderedlist', className:'btn-success'},
                                {name:'outdent', className:'btn-purple'},
                                {name:'indent', className:'btn-purple'},
                                null,
                                {name:'justifyleft', className:'btn-primary'},
                                {name:'justifycenter', className:'btn-primary'},
                                {name:'justifyright', className:'btn-primary'},
                                {name:'justifyfull', className:'btn-inverse'},
                                null,
                                {name:'createLink', className:'btn-pink'},
                                {name:'unlink', className:'btn-pink'},
                                null,
                                {name:'insertImage', className:'btn-success'},
                                null,
                                'foreColor',
                                null,
                                {name:'undo', className:'btn-grey'},
                                {name:'redo', className:'btn-grey'}
                            ],
                    'wysiwyg': {
                        fileUploadError: showErrorAlert
                    }
                }).prev().addClass('wysiwyg-style2');
            })
        </script>

        <script type="text/javascript">

            function uploadIconFile(){
                $.ajaxFileUpload({
                    url:"${ctx}/admin/upload/uploadIconFile.do",            //需要链接到服务器地址
                    dataType : 'text/html',
                    fileElementId:'id-input-icon',                        //文件选择框的id属性
                    success: function(data, status){
                        data = jQuery.parseJSON(jQuery(data).text());
                        $("#icon512").attr("src",data.absIcon512Url);
                        $("#icon512a").attr("href",data.absIcon512Url);
                        $("#icon125").attr("src",data.absIcon125Url);
                        $("#icon125a").attr("href",data.absIcon125Url);
                        $("#icon114").attr("src",data.absIcon114Url);
                        $("#icon114a").attr("href",data.absIcon114Url);
                        $("#icon62").attr("src",data.absIcon62Url);
                        $("#icon62a").attr("href",data.absIcon62Url);
                        $("#iconUrl").val(data.absIconUrl);
                    },error: function (data, status, e){
                    }
                });
            }

            function uploadAdFile(){
                $.ajaxFileUpload({
                    url:"${ctx}/admin/upload/uploadAdFile.do",            //需要链接到服务器地址
                    dataType : 'text',
                    fileElementId:'id-input-ad',                        //文件选择框的id属性
                    success: function(data, status){
                        data = jQuery.parseJSON(jQuery(data).text());
                        $("#ad").attr("src",data.absAdUrl);
                        $("#ada").attr("href",data.absAdUrl);
                        $("#adthumb").attr("src",data.absAdThumbUrl);
                        $("#adthumba").attr("href",data.absAdThumbUrl);
                        $("#adIconUrl").val(data.absAdUrl);
                    },error: function (data, status, e){
                    }
                });
            }

            function uploadScreenShot(){
                $.ajaxFileUpload({
                    url:"${ctx}/admin/upload/uploadScreenShot.do",            //需要链接到服务器地址
                    dataType : 'text',
                    fileElementId:'id-input-screenshot',                        //文件选择框的id属性
                    success: function(data, status){
                        data = jQuery.parseJSON(jQuery(data).text());
                        liString = '<li>'
                                        +'<a href="'+data.screenUrl+'" data-rel="colorbox">'
                                            +'<img width="150" height="150" alt="62*62" src="'+data.screenUrl+'" />'
                                        +'</a>'
                                        +'<input id="screenshotId" name="screenshotId" type="hidden" value="'+data.id+'"/>'
                                        +'<input id="screenshotUrl" name="screenshotUrl" type="hidden" value="'+data.screenUrl+'"/>'
                                        +'<div class="tools tools-bottom">'
                                            +'<a onclick="delScreenshot(this)"> <i class="ace-icon fa fa-times red"></i></a>'
                                        +'</div>'
                                    +'</li>';
                        $("#screenshotul").append(liString);
                    },error: function (data, status, e){
                    }
                });
            }

            function delScreenshot(image){
                bootbox.confirm({
                            message: "确定删除该截图?",
                            buttons: {
                                confirm: {
                                    label: "确定",
                                    className: "btn-primary btn-sm"
                                },
                                cancel: {
                                    label: "取消",
                                    className: "btn-sm"
                                }
                            },
                            callback: function(result) {
                                if(result){
                                    screenshotSoftItemId = $(image).parent().parent().children("#screenshotSoftItemId").val();
                                    if(screenshotSoftItemId!=""){
                                        $.get("${ctx}/admin/soft/delScreenshot.do", { id: screenshotSoftItemId},function(data){
                                            $(image).parent().parent().remove();
                                        });
                                    }else{
                                        $(image).parent().parent().remove();
                                    }
                                }
                            }
                        }
                );

            }

            function submitSoft(submitType){
                $("#submitType").val(submitType);
                $("#description").val($("#descriptiondiv").html());
                //处理设备多选
                o = document.getElementById("deviceType");
                t = document.getElementById("deviceTypeList");
                var intvalue="";
                for(i=0;i<o.length;i++){
                    if(o.options[i].selected){
                        intvalue+=o.options[i].value+",";
                    }
                }
                t.value=intvalue.substr(0,intvalue.length-1);


                $.ajax({
                    cache: true,
                    type: "POST",
                    url:"${ctx}/admin/soft/save.do",
                    data:$('#softItemForm').serialize(),// 你的formid
                    async: false,
                    error: function(request) {
                        alert("Connection error");
                    },
                    success: function(data) {
                        $("#commonLayout_appcreshi").parent().html(data);
                    }
                });
            }

            $('#id-input-apk,#id-input-icon,#id-input-gamecut,#id-input-ad,#id-input-screenshot').ace_file_input({
                no_file:'未选择文件 ...',
                btn_choose:'浏览',
                btn_change:'更改',
                droppable:false,
                onchange:null,
                thumbnail:false //| true | large
                //whitelist:'gif|png|jpg|jpeg'
                //blacklist:'exe|php'
                //onchange:''
                //
            });
        </script>

    <form id="softItemForm" class="form-horizontal" action="${ctx}/admin/soft/save.do" method="post">
        <!--上传APK块---->
        <div class="row">
            <div class="col-sm-12">
                <div class="widget-box">
                    <div class="widget-header">
                        <h4 class="widget-title">上传应用</h4>

                    </div>

                    <div class="widget-body">
                        <div class="widget-main">
                            <div class="form-group">
                                <label class="control-label col-xs-12 col-sm-1" for="softId">应用地址:</label>
                                <div class="col-xs-12 col-sm-11 control-label">
                                    ${vo.fileUrl!}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!--上传ICON块---->
        <div class="row">
            <div class="col-sm-12">
                <div class="widget-box">
                    <div class="widget-header">
                        <h4 class="widget-title">上传图标(512x512.png)</h4>

                    </div>

                    <div class="widget-body">
                        <div class="widget-main">
                            <div class="form-group">
                                <div class="col-xs-8">
                                    <!-- #section:custom/file-input -->
                                    <input type="file" id="id-input-icon" name="iconFile" value="${vo.iconFile!}"/>
                                </div>
                                <button type="button" id="id-button-icon" class="btn btn-sm btn-success" onclick="uploadIconFile()">
                                    上传 <i class="ace-icon fa fa-arrow-right icon-on-right bigger-60"></i>
                                </button>
                            </div>
                        </div>
                    </div>

                    <div class="widget-body">
                        <div class="widget-main">
                            <div>
                                <ul class="ace-thumbnails clearfix">

                                    <li><a id="icon512a" name="icon512a" data-rel="colorbox" href="${vo.icon512a!}">
                                        <img id="icon512" name="icon512" width="256" height="256" alt="512*512" src="${vo.icon512a!}" />
                                        </a>
                                    </li>
                                    <li><a id="icon125a" name="icon125a" data-rel="colorbox" href="${vo.icon125a!}">
                                        <img id="icon125" name="icon125" width="62" height="62" alt="125*125"  src="${vo.icon125a!}" />
                                    </a>
                                    </li>
                                    <li><a id="icon114a" name="icon114a" data-rel="colorbox" href="${vo.icon114a!}">
                                        <img id="icon114" name="icon114" width="57" height="57" alt="114*114"  src="${vo.icon114a!}" />
                                    </a>
                                    </li>
                                    <li><a id="icon62a" name="icon62a" data-rel="colorbox" href="${vo.icon62a!}">
                                        <img id="icon62" name="icon62" width="31" height="31" alt="62*62"  src="${vo.icon62a!}" />
                                    </a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!----上传广告图-------->
        <div class="row">
            <div class="col-sm-12">
                <div class="widget-box">
                    <div class="widget-header">
                        <h4 class="widget-title">上传广告图</h4>

                    </div>

                    <div class="widget-body">
                        <div class="widget-main">
                            <div class="form-group">
                                <div class="col-xs-8">
                                    <!-- #section:custom/file-input -->
                                    <input type="file" id="id-input-ad" name="adFile" value="${vo.adFile!}"/>
                                </div>
                                <button type="button" id="id-button-ad" class="btn btn-sm btn-success" onclick="uploadAdFile()">
                                    上传 <i class="ace-icon fa fa-arrow-right icon-on-right bigger-60"></i>
                                </button>

                            </div>
                        </div>
                    </div>

                    <div class="widget-body">
                        <div class="widget-main">
                            <div>
                                <ul class="ace-thumbnails clearfix">

                                    <li><a id="ada" name="ada" data-rel="colorbox" href="${vo.ada!}">
                                        <img id="ad" name="ad" width="150"  alt="广告原图" src="${vo.ada!}"/>
                                    </a>
                                    </li>
                                    <li><a id="adthumba" name="adthumba" data-rel="colorbox" href="${vo.adthumba!}">
                                        <img id="adthumb" name="adthumb" width="80"  alt="广告缩略图"  src="${vo.adthumba!}"/>
                                    </a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!----上传截图块-------->
        <div class="row">
            <div class="col-sm-12">
                <div class="widget-box">
                    <div class="widget-header">
                        <h4 class="widget-title">上传软件截图</h4>

                    </div>

                    <div class="widget-body">
                        <div class="widget-main">
                            <div class="form-group">
                                <div class="col-xs-8">
                                    <!-- #section:custom/file-input -->
                                    <input type="file" id="id-input-screenshot" name="screenshotFile" id="id-input-screenshot" />
                                </div>
                                <button type="button" id="id-button-screenshot" class="btn btn-sm btn-success" onclick="uploadScreenShot()">
                                    上传 <i class="ace-icon fa fa-arrow-right icon-on-right bigger-60"></i>
                                </button>
                            </div>
                        </div>
                    </div>

                    <div class="widget-body">
                        <div class="widget-main">
                            <div>
                                <ul id="screenshotul" class="ace-thumbnails clearfix">

                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>


            <!---软件信息----->
            <div class="row">
                <div class="col-sm-12">
                    <div class="widget-box">
                        <div class="widget-header">
                            <h4 class="widget-title">软件信息</h4>

                        </div>

                        <div class="widget-body">
                            <div class="widget-main">
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2" for="softId">软件编号:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <input type="text" readonly="" name="softId" id="softId" class="form-control col-sm-4 required" value="${vo.softId!}"/>
                                        </div>
                                    </div>
                                    <label class="control-label col-xs-12 col-sm-2 no-padding-right" for="lastSoftItemId">最新版本:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <input type="text" readonly="" name="lastSoftItemId" id="lastSoftItemId" class="form-control col-sm-4 required" value="${vo.lastSoftItemId!}"/>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2" for="packageName">软件包名:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <input type="text" readonly="" name="packageName" id="packageName" class="form-control col-sm-4 required" value="${vo.packageName!}"/>
                                        </div>
                                    </div>
                                    <label class="control-label col-xs-12 col-sm-2 no-padding-right" for="softName">软件名称:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <input type="text" name="softName" id="softName" class="form-control col-sm-4 required" value="${vo.softName!}"/>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2" for="isAccredit">是否授权:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <div>
                                                <select class="form-control" name="isAccredit" id="isAccredit" data-placeholder="Choose a State...">
                                                    <option value="1">是</option>
                                                    <option value="0">否</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <label class="control-label col-xs-12 col-sm-2 no-padding-right" for="sysStarsEnable">开启星级:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <div>
                                                <select class=" form-control" name="sysStarsEnable" id="sysStarsEnable" data-placeholder="Choose a State...">
                                                    <option value="0">关闭</option>
                                                    <option value="1">开启</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2" for="sysStars">系统星级:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <div>
                                                <select class="form-control" name="sysStars" id="sysStars"  data-placeholder="Choose a star...">
                                                    <option value=""></option>
                                                    <option value="0.5">0.5</option>
                                                    <option value="1">1.0</option>
                                                    <option value="1.5">1.5</option>
                                                    <option value="2">2.0</option>
                                                    <option value="2.5">2.5</option>
                                                    <option value="3">3.0</option>
                                                    <option value="3.5">3.5</option>
                                                    <option value="4">4.0</option>
                                                    <option value="4.5">4.5</option>
                                                    <option value="5">5.0</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>

                                    <label class="control-label col-xs-12 col-sm-2 no-padding-right" for="commentStars">评论星级:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <div>
                                                <select class="form-control" name="commentStars" id="commentStars"  data-placeholder="Choose a star...">
                                                    <option value=""></option>
                                                    <option value="0.5">0.5</option>
                                                    <option value="1">1.0</option>
                                                    <option value="1.5">1.5</option>
                                                    <option value="2">2.0</option>
                                                    <option value="2.5">2.5</option>
                                                    <option value="3">3.0</option>
                                                    <option value="3.5">3.5</option>
                                                    <option value="4">4.0</option>
                                                    <option value="4.5">4.5</option>
                                                    <option value="5">5.0</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2" for="isOfficial">是否官方:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <div>
                                                <select class="form-control" name="isOfficial" id="isOfficial" data-placeholder="Choose a State...">
                                                    <option value="1">是</option>
                                                    <option value="0">否</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <label class="control-label col-xs-12 col-sm-2 no-padding-right" for="downloadNumber">总下载量:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <input type="text" name="downloadNumber" id="downloadNumber" class="form-control col-sm-4 required" value="${vo.downloadNumber!}"/>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2" for="seo">搜索关键词（用空格隔开）:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <input type="text" name="seo" id="seo" class="form-control col-sm-4 required" value="${vo.seo!}"/>
                                        </div>
                                    </div>
                                    <label class="control-label col-xs-12 col-sm-2 no-padding-right" for="developerName">开发者名称:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <input type="text" name="developerName" id="developerName" class="form-control col-sm-4 required" value="${vo.developerName!}"/>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2" for="developerPhone">开发者手机/电话:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <input type="text" name="developerPhone" id="developerPhone" class="form-control col-sm-4 required" value="${vo.developerPhone!}"/>
                                        </div>
                                    </div>
                                    <label class="control-label col-xs-12 col-sm-2 no-padding-right" for="developerEmail">开发者邮箱:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <input type="text" name="developerEmail" id="developerEmail" class="form-control col-sm-4 required" value="${vo.developerEmail!}"/>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2" for="developerSite">开发者网站:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <input type="text" name="developerSite" id="developerSite" class="form-control col-sm-4 required" value="${vo.developerSite!}"/>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2" for="categoryId">软件分类:</label>
                                    <div class="col-xs-12 col-sm-3">
                                        <div class="clearfix">
                                            <div>
                                                <select class="form-control" name="categoryId" id="categoryId" data-placeholder="请选择一级分类">
                                                    <option value="0">--请选择一级分类--</option>
                                                    <#list firstCatagories as first>
                                                        <option value="${first.id}" >
                                                            ${(first.categoryName)!}
                                                        </option>
                                                    </#list>
                                                </select>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="col-xs-12 col-sm-3">
                                        <div class="clearfix">
                                            <div>
                                                <select class="form-control" name="categoryId2" id="categoryId2" data-placeholder="请选择二级分类">
                                                    <option value="0">请选择二级分类</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="col-xs-12 col-sm-3">
                                        <div class="clearfix">
                                            <div>
                                                <select class="form-control" name="categoryId3" id="categoryId3" data-placeholder="请选择三级分类">
                                                    <option value="0">请选择三级分类</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                </div>


                                <div class="form-group">
                                    <div>
                                        <label class="control-label col-xs-12 col-sm-2" for="summary">软件简介:</label>
                                        <div class="control-label col-xs-10 col-sm-10 " >
                                            <textarea class=" col-sm-10 limited" id="summary" name="summary" maxlength="500">${vo.summary!}</textarea>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2" for="descriptiondiv">软件简介:</label>
                                    <div class="col-sm-10 " >
                                        <div class="wysiwyg-editor " id="descriptiondiv" name="descriptiondiv" style="border:1px solid #d5d5d5">${vo.description!}</div>
                                        <textarea hidden="hidden" id="description" name="description">${vo.description!}</textarea>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>


            <!---版本信息----->
            <div class="row">
                <div class="col-sm-12">
                    <div class="widget-box">
                        <div class="widget-header ">
                            <h4 class="widget-title">版本信息</h4>
                        </div>
                        <div class="widget-body">
                            <div class="widget-main">
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2 no-padding-right" for="softItemId">软件版本编号:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <input type="text" readonly="" name="softItemId" id="softItemId" class="form-control col-sm-4 required" value="${vo.softItemId!}"/>
                                        </div>
                                    </div>
                                    <label class="control-label col-xs-12 col-sm-2" for="itemName">软件具体名称:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <input type="text" name="itemName" id="itemName" class="form-control col-sm-4 required" value="${vo.itemName!}"/>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2 no-padding-right" for="versionCode">版本号:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <input type="text"  name="versionCode" id="versionCode" class="form-control col-sm-4 required" value="${vo.versionCode!}"/>
                                        </div>
                                    </div>
                                    <label class="control-label col-xs-12 col-sm-2 no-padding-right" for="versionName">版本名称:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <input type="text"  name="versionName" id="versionName" class="form-control col-sm-4 required" value="${vo.versionName!}"/>
                                        </div>
                                    </div>

                                </div>

                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2 no-padding-right" for="fileSize">软件大小:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <input type="text" readonly="" name="fileSize" id="fileSize" class="form-control col-sm-4 required" value="${vo.fileSize!}"/>
                                            <input id="fileUrl" name="fileUrl" type="hidden" value="${vo.fileUrl!}"/>
                                            <input id="fileMD5" name="fileMD5" type="hidden" value="${vo.fileMD5!}"/>
                                        </div>
                                    </div>

                                </div>

                                <div class="form-group">

                                    <label class="control-label col-xs-12 col-sm-2" for="language">语言:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <div>
                                                <select class="form-control"  name="language" id="language" data-placeholder="Choose a State...">
                                                    <option value="0">中文</option>
                                                    <option value="1">英文</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <label class="control-label col-xs-12 col-sm-2" for="isLastVersion">是否最新版本:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <div>
                                                <select class="form-control" name="isLastVersion" id="isLastVersion" data-placeholder="Choose a State...">
                                                    <option value="1">是</option>
                                                    <option value="0">否</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2" for="deviceTypeList">支持的设备类型:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <select multiple="" class="chosen-select form-control" name="deviceType"
                                                    id="deviceType" data-placeholder="Choose a State...">
                                                <#list terminals as t>
                                                    <option value="${t.id!}">${t.terminalName!}</option>
                                                </#list>
                                            </select>
                                        </div>
                                    </div>
                                    <label class="control-label col-xs-12 col-sm-2 no-padding-right" for="state">软件状态:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <div>
                                                <select class="form-control" name="state" id="state"  data-placeholder="Choose a State...">
                                                    <option value="0">待审核</option>
                                                    <option value="1">已保存</option>
                                                    <option value="3">上架</option>
                                                    <option value="4">审核未通过</option>
                                                    <option value="5">已下架</option>
                                                    <option value="6">隐藏</option>
                                                    <option value="-1">删除</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                </div>


                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2" for="minFirewareId">最小平台固件:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <input type="text" name="minFirewareId" id="minFirewareId" class="form-control col-sm-4 required" value="${vo.minFirewareId!}"/>
                                        </div>
                                    </div>
                                    <label class="control-label col-xs-12 col-sm-2 no-padding-right" for="maxFirewareId">最大平台固件:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <input type="text" name="maxFirewareId" id="maxFirewareId" class="form-control col-sm-4 required" value="${vo.maxFirewareId!}"/>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2" for="adState">是否含广告:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <div>
                                                <select class="form-control" name="adState" id="adState" data-placeholder="Choose a State...">
                                                    <option value="0">无广告</option>
                                                    <option value="1">有广告</option>
                                                    <option value="2">含恶意广告</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <label class="control-label col-xs-12 col-sm-2 no-padding-right" for="safeState">安全级别:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <div>
                                                <select class="form-control"  name="safeState" id="safeState" data-placeholder="Choose a State...">
                                                    <option value="0">不安全</option>
                                                    <option value="1">安全</option>
                                                    <option value="2">病毒/木马软件</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2" for="resolution">分辨率尺寸值:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <div>
                                                <select class="form-control" name="resolution" id="resolution" data-placeholder="Choose a State...">
                                                    <option value="0">360*360</option>
                                                    <option value="1">720*720</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <label class="control-label col-xs-12 col-sm-2 no-padding-right" for="payType">付费方式:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <div>
                                                <select class="form-control"  name="payType" id="payType" data-placeholder="Choose a State...">
                                                    <option value="0">免费</option>
                                                    <option value="1">付费</option>
                                                    <option value="2">限时免费</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2" for="firstPublish">是否首发:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <div>
                                                <select class="form-control"  name="firstPublish" id="firstPublish" data-placeholder="Choose a State...">
                                                    <option value="0">否</option>
                                                    <option value="1">是</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <label class="control-label col-xs-12 col-sm-2 no-padding-right" for="softSrc">软件来源:</label>
                                    <div class="col-xs-12 col-sm-4">
                                        <div class="clearfix">
                                            <div>
                                                <select class="form-control"  name="softSrc" id="softSrc" data-placeholder="Choose a State...">
                                                    <option value="0">gameCnter</option>
                                                    <option value="1">M1</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <div>
                                        <label class="control-label col-xs-12 col-sm-2" for="permission">软件拥有的执行权限:</label>
                                        <div class="control-label col-xs-10 col-sm-10 " >
                                            <textarea  readonly="" class=" col-sm-10 limited" name="permission" id="permission"  maxlength="1000">${vo.permission!}</textarea>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">

                                    <div>
                                        <label class="control-label col-xs-12 col-sm-2" for="checkReason">审核原因备注:</label>
                                        <div class="control-label col-xs-10 col-sm-10 " >
                                            <textarea class=" col-sm-10 limited" id="checkReason" name="checkReason" maxlength="1000" >${vo.checkReason!}</textarea>
                                        </div>
                                    </div>

                                </div>

                                <div class="form-group">
                                    <div>
                                        <label class="control-label col-xs-12 col-sm-2" for="updateDescription">版本更新介绍:</label>
                                        <div class="control-label col-xs-10 col-sm-10 " >
                                            <textarea class=" col-sm-10 limited" id="updateDescription" name="updateDescription" maxlength="1000" >${vo.updateDescription!}</textarea>
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <input id="adIconUrl" name="adIconUrl" type="hidden"/>
            <input id="iconUrl" name="iconUrl" type="hidden"/>
            <input type="hidden" name="submitType" id="submitType">
            <input type="hidden" name="deviceTypeList" id="deviceTypeList">
            <div class="clearfix form-actions">
                <div class="col-md-offset-3 col-md-9">
                    <button class="btn btn-info" type="button" >
                        <i class="ace-icon fa fa-check bigger-110"></i> 提交审核
                    </button>
                    &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;
                    <button class="btn btn-info" type="button">
                        <i class="ace-icon fa fa-check bigger-110"></i> 直接发布
                    </button>
                    &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;
                    <button class="btn" type="button" onclick="submitSoft(1)">
                        <i class="ace-icon fa fa-undo bigger-110"></i> 存入草稿箱
                    </button>
                </div>
            </div>
        </form>

<script src="${ctx}/static/admin/assets/js/jquery.validate.js"></script>
<script src="${ctx}/static/admin/assets/js/jquery.validate.messages_zh.js"></script>